package com.hc.pingtan.model;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author yu.han
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CommonResult<T> {
    public static final String RESULT_CODE_SUCCESS = "0";

    @Builder.Default
    private String resultCode = RESULT_CODE_SUCCESS;
    @Builder.Default
    private String resultMsg = "success";
    private T result;

    public Boolean checkSuccess() {
        return RESULT_CODE_SUCCESS.equals(this.getResultCode());
    }
}